import java.util.ArrayList;
import java.util.List;

import bean.Product;


public class No7 {
	private static List<Product> productList = new ArrayList<Product>();
	
	private static List<Product> initProductList(){
		for (int i = 0; i < 5; i++) {
			Product product = new Product();
			product.setProductName("Item 00" + (i+1));
			product.setProductPrice(new Double((i+1)+"00"));
			product.setStatus("Active");
			System.out.println(product);
			
			productList.add(product);
		}
		
		return productList;
	}
	
	public static void main(String[] args) {
		initProductList();
		Product product = productList.get(1);
		
//		Product product = new Product();
//		product.setProductName("Item 001");
//		product.setProductPrice(new Double("100"));
//		product.setStatus("Active");
		
		System.out.println("Target : " + product);
		
		System.out.println(productList.contains(product));
		System.out.println(productList.indexOf(product));
		
	}
}
